1. Field of the Invention
The present invention relates to an information processing apparatus for detecting a device connected to a network and its method.
2. Description of the Related Art
A local area network (LAN) has been spread in general homes. A device such as a printing device has been shared by a plurality of computers via the LAN. In the LAN in a home, Transmission Control Protocol/Internet Protocol (TCP/IP) is generally used. The TCP/IP identifies each device by an IP address and executes communication. However, allocation of addresses requires knowledge concerning the network. Thus, allocation of addresses is difficult for a general user without the knowledge.
Thus, in general homes, a router which connects the LAN to the Internet generally has a Dynamic Host Configuration Protocol (DHCP) server function to automatically allocate the IP address to a connected device using the function. Since the DHCP server dynamically allocates the IP address, the connected device is not necessarily allocated with the same address whenever it is started.
When a printing device is used from a computer that is a host device, the computer stores the IP address of the printing device, transmits data to the IP address, and executes communication. At this time, if an address different from the IP address to be stored by the computer is allocated to the printing device, the computer cannot identify a destination address for communicating with the printing device. Thus, the computer cannot execute communication with the printing device.
In order to solve this problem, there is a method for detecting a desired device using broadcast that transmits a packet to unspecified parties when communication cannot be executed with the IP address of the printing device that is stored in the computer. In this method, first the computer stores the IP address and a value specific to a device (e.g., media access control (MAC) address) of a target device to be used in advance. Then, the computer broadcasts inquiry about the IP address. A device which received this inquiry replies a response including the MAC address. When the response is received, the computer compares the specific value stored in the computer itself and a specific value included in the response, and checks whether there is the response from the target device. Further, by including the IP address in the response from the device, the IP address of the target device can be confirmed and updated.
Currently, with increase in security consciousness, fire wall software is spread in a home computer. A fire wall monitors network communication on the computer and restricts communication to prevent an unauthorized access from the outside. Settings of the fire wall software to maintain security may restrict communication by broadcast which is transmitted to unspecified host addresses. More specifically, for example, a response to the broadcast request transmitted by an application which operates on the computer is blocked by the fire wall and does not reach the application. In such the situation, a device allocated with an address different from the previous address by the DHCP server cannot be detected using the broadcast.
On the other hand, as a UNIX (registered trademark) operating system (OS), Linux (registered trademark) has been spread. Linux is software free of charge and the introduction thereof is becoming easy. Thus, even if a user who is not familiar with a computer may frequently use a Linux environment. Further, a case in which Linux is preinstalled on a computer has appeared. Linux includes various distributions, such as Fedora (registered trademark), Ubuntu (registered trademark), openSUSE (registered trademark) and the like. Using these distributions, various environments can easily be constructed. In many distributions, the fire wall software is basically introduced. Thus, the application cannot frequently freely be communicated using the broadcast. Change in the setting of the fire wall is often not desired by a user in terms of security. Further, the changing the setting itself may be difficult because a setting method is significantly different by environments.
As the prior art, Japanese Patent Application Laid-Open No. 2006-340286 discusses a method for detecting a device on a network even under an environment in which communication by the broadcast is restricted. In Japanese Patent Application Laid-Open No. 2006-340286, both of broadcast and unicast are used to detect the device. More specifically, when the unicast has normally been executed, the broadcast is tried to determine availability of the broadcast at that time. Based on a result of determination of the availability, the detection method is selected or is changed its order. The unicast is one-to-one communication to be executed by designating an IP address of the destination. Unlike the broadcast, the unicast is not communication with an unspecified number of devices. Thus, the communication by the unicast is rarely restricted by the fire wall. When a device on a network is detected using the unicast, communication will be individually executed with all addresses which can be present on the network by the unicast.
Detection of the device on the network by the unicast needs to try the detection on a one-to-one level to a large number of addresses. This processing includes time (timeout) necessary to wait for a response from each address and often takes long time to detect the device. If the detection of the device takes long time, a user may determine that the detection highly possibly fails and interrupt the detection. This is the same as that the device cannot be detected in terms of results.
Further, there are various types of the fire wall software, such as the software which is attached to a specific OS as standard or made by a third party. Thus, there is no general method for identifying settings of the fire wall software from other applications. Accordingly, even if it is set so that the communication by the broadcast is restricted by the fire wall, the application cannot identify the setting. In other words, when a response to the request transmitted by the broadcast is not received, its cause cannot be identified. As a cause for that the response to the request transmitted by the broadcast is not received, there is another reason such that the electric power source of the target device is not turned on. Currently, only the result that the application has failed in communication by the broadcast can be recognized but it cannot be distinguished whether the application is blocked by the fire wall or another reason.